Sample 2 Plot lines


Start() END FUNCTION Start() SYSTEM(FontSize=18, BackGround=995) DO $XV(10) = 0 $YV(10) = 0 $XV($)=RAN(50,45) $YV($)=RAN(50,45) Singles() Multis() DLG(L=0,W=1/3,Edit='#What is shown',W=3, LBL='ESCape to see code', B='Show again', B='Quit')

#What is shown 2 vectors XV and YV are set to random numbers and are used in all 4 examples. The function "Singles" . MOVES the pointer to the current . (x-5,y-10) target . DRAWS to (x+5,y+10). The point properties . can be set individually, e.g: . color rgb (red green blue) . TextA The function "Multis" . plots the same data 3 times: 1. lines + symbols (Draw=9 . =blue) 2. symbols only (Draw=-90 . =magenta symbols) . If Symbol=$: . draw index number 3. lines only (Draw=900 . =red) . to dash set Broken = . DashLength.GapLength
IF($txtRC == 'Quit') SYSTEM(QUIT=1) ENDDO END FUNCTION Singles() DLG(TI='Scalar x,y allow line segments', R=2, C=3, AX=2) DO J = 1, 10, 2 x1 = $XV(J) y1 = $YV(J) x2 = $XV(J+1) y2 = $YV(J+1) color = 100*J ! 9 * (x2 > x1) + 900*(x2